package com.fishingwithme.infrastructure.dtos.circle;

import com.fishingwithme.domain.common.Location;
import com.fishingwithme.infrastructure.utils.CommonUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.util.List;

@Data
public class CircleLocationDto {
    private Long id;
    private String title;
    private Double longitude;
    private Double latitude;
    private List<Location> points;
    @JsonIgnore
    private String pointsString;
    public static CircleLocationDto formatDtoJson(CircleLocationDto dto) {
        dto.points = CommonUtils.convert(dto.pointsString, Location.class);
        return dto;
    }
}
